<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component"
          xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://java.sun.com/jsf/facelets">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>


        <html id="outputHtml1">
            <body onLoad="alert('hello');">
                <form method="post" action="workflowupload.html" enctype="multipart/form-data">
                </form>
                <ice:outputStyle href="/resources/xp-portlet.css" id="outputStyle1"/>
                <ice:portlet>
                    <ice:form id="serverWFs">

                        <ice:outputText value="Upload a new workflow" style="color:#191970; font-size:12px" />
                        <ice:inputFile id="inputFileName" actionListener="#{ServerWorkflows.uploadFile}" width="600" />
                        <br/>
                        <ice:outputText binding="#{ServerWorkflows.workflowId}" style="color:green" />
                        <br/>
                        <ice:commandLink action="#{ServerWorkflows.showWorkflows}" value="Refresh available workflows" style="font-weight:bold"/>
                        <br/>
                        <br/>
                        <ice:dataTable binding="#{ServerWorkflows.workflowsTable}" cellspacing="3" columnWidths="0px, 230px, 270px, 50px, 25px, 25px" id="workflowsTable"
                                       scrollHeight="200px" scrollable="true" var="workflow" rendered="#{ServerWorkflows.workflowsVis}" >
                            <ice:rowSelector toggleOnClick="false"/>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Workflow ID" style="font-weight:bold"/>
                                </f:facet>
                                <ice:outputText value="#{workflow.id}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Date added" style="font-weight:bold"/>
                                </f:facet>
                                <ice:outputText value="#{workflow.dateAdded}" />
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Status" style="font-weight:bold"/>
                                </f:facet>
                                <ice:graphicImage value="/resources/icons/png/16x16/OK.png" title="Enabled"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton image="/resources/icons/png/16x16/List.png" actionListener="#{workflowBean.pushServer}" title="Create Interface"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton image="/resources/icons/png/16x16/33.png" actionListener="#{workflowBean.pushServer}" title="Delete workflow"/>
                            </ice:column>
                        </ice:dataTable>
                        <br/>
                        <ice:panelGrid columns="3">
                            <ice:graphicImage value="/resources/icons/png/16x16/Info.png" />
                            <ice:outputText value="  "/>
                            <ice:outputText value=" This portlet shows the workflows that are available to run on the Taverna Server and create interfaces for them using the 'Interface Builder' portlet"
                                            style="font-style:italic; font-size:12px; color:#666666"/>
                        </ice:panelGrid>
                    </ice:form>
                </ice:portlet>
            </body>
        </html>
    </f:view>
</jsp:root>
